package com.yuanren.em.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.LocalDateTime;

/**
 * 会员通知实体类
 */
@TableName("t_member_notification")
public class MemberNotification {
    
    @TableId(type = IdType.AUTO)
    private Long id;
    
    private Long userId;
    
    private String notificationType; // LEVEL_UP, POINTS_EARNED, BENEFIT_UNLOCKED
    
    private String title;
    
    private String content;
    
    private Long fromLevelId;
    
    private Long toLevelId;
    
    private Integer pointsAmount;
    
    private Long benefitId;
    
    private Boolean isRead;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime readAt;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedAt;
    
    // 关联对象 - 非数据库字段
    @TableField(exist = false)
    private User user;
    @TableField(exist = false)
    private MemberLevel fromLevel;
    @TableField(exist = false)
    private MemberLevel toLevel;
    @TableField(exist = false)
    private MemberBenefit benefit;

    // Getters and Setters
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getNotificationType() {
        return notificationType;
    }

    public void setNotificationType(String notificationType) {
        this.notificationType = notificationType;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Long getFromLevelId() {
        return fromLevelId;
    }

    public void setFromLevelId(Long fromLevelId) {
        this.fromLevelId = fromLevelId;
    }

    public Long getToLevelId() {
        return toLevelId;
    }

    public void setToLevelId(Long toLevelId) {
        this.toLevelId = toLevelId;
    }

    public Integer getPointsAmount() {
        return pointsAmount;
    }

    public void setPointsAmount(Integer pointsAmount) {
        this.pointsAmount = pointsAmount;
    }

    public Long getBenefitId() {
        return benefitId;
    }

    public void setBenefitId(Long benefitId) {
        this.benefitId = benefitId;
    }

    public Boolean getIsRead() {
        return isRead;
    }

    public void setIsRead(Boolean isRead) {
        this.isRead = isRead;
    }

    public LocalDateTime getReadAt() {
        return readAt;
    }

    public void setReadAt(LocalDateTime readAt) {
        this.readAt = readAt;
    }

    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }

    public LocalDateTime getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public MemberLevel getFromLevel() {
        return fromLevel;
    }

    public void setFromLevel(MemberLevel fromLevel) {
        this.fromLevel = fromLevel;
    }

    public MemberLevel getToLevel() {
        return toLevel;
    }

    public void setToLevel(MemberLevel toLevel) {
        this.toLevel = toLevel;
    }

    public MemberBenefit getBenefit() {
        return benefit;
    }

    public void setBenefit(MemberBenefit benefit) {
        this.benefit = benefit;
    }
} 